
/**
 * Created by xiongshilin on 2017/3/29.
 */
(function(){
    ADF.figure.DiagramFigure = function() {
        ADF.figure.DiagramFigure.superclass.constructor.call(this);
    };
    COM.util.defineClass(ADF.figure.DiagramFigure, AGEF.AbrazosUnlimitedFreeformFigure, {
        layout : function(){
            if(this.layoutManager){
                var children = this.getChildren(), that = this;
                children.forEach(function(child, index, array){
                    that.getWidget().layoutChild(child.getWidget());
                    var widgetBounds = child.getWidget().getBounds();
                    var newConstraint = new COM.draw2d.Rectangle(widgetBounds.x, widgetBounds.y, widgetBounds.width, widgetBounds.height);
                    that.getLayoutManager().setConstraint(child, newConstraint);
                });
                this.layoutManager.layout(this);
            }
        }
    });
})();